<template>
    <Drawer title="日志信息" :width="80" :mask-closable="false" v-model="drawer" @on-close="changeclose">
      <Tabs type="card"  @on-click="changeTabs">
        <TabPane label="站点更新日志" >
          <seemodal ref="seemodal"></seemodal>
        </TabPane>
        <TabPane label="站点访问日志" >
            <siteLog ref="siteLog"></siteLog>
        </TabPane>
      </Tabs>
    </Drawer>
</template>
<script>
    import seemodal from './seemodal.vue'
    import siteLog from './siteLog.vue'
    export default {
        components: { seemodal, siteLog },
        data () {
            return {
                drawer: false,
                modalData: '',
                name: 'name1'
            }
        },
        methods: {
            initial (row) {
                this.modalData = row
                this.drawer = true
                this.$refs.seemodal.initial(row)
                this.$refs.siteLog.initial(row)
            },
            changeclose () {
                this.drawer = false
                // this.$emit('askData')
                this.name = 'name1'
            },
            changeTabs (name) {
                if (name == 'name1') {
                    this.$refs.seemodal.initial(this.modalData)
                } else {
                    this.$refs.siteLog.initial(this.modalData)
                }
            }
        }

    }
</script>
